﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PcapDemo
{
    public class LogHelper
    {
        private static StringBuilder _sb = new StringBuilder();

        public static void Info()
        {
            Console.WriteLine("");
            _sb.AppendLine("");
        }

        public static void Info(string value)
        {
            Console.WriteLine(value);
            _sb.AppendLine(value);
        }

        public static void Info(int value)
        {
            Console.WriteLine(value);
            _sb.AppendLine(Convert.ToString(value));
        }

        public static void Info(string format, params object[] objs)
        {
            Console.WriteLine(format, objs);
            _sb.AppendLine(string.Format(format, objs));
        }

        public static void Save(string path)
        {
            File.WriteAllText(path, _sb.ToString());
        }
    }
}
